/*
 * @Author: 梓岄 3049738225@qq.com
 * @Date: 2025-11-28 21:16:12
 * @LastEditors: 梓岄 3049738225@qq.com
 * @LastEditTime: 2025-11-28 22:13:25
 * @FilePath: /test/Server.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include"Shm.hpp"
#include<unistd.h>

int main()
{
    Shm shm;
    shm.Creat();
    shm.Attach();

    sleep(2);

    char* start_addr=(char*)shm.GetStartAddr();
    int size=shm.GetSize();

    while(true)
    {
        for(int i=0;i<size;i++)
        {
            std::cout<<start_addr[i]<<' ';
        }
        std::cout<<std::endl;
        sleep(1);
    }

    shm.Detach();
    shm.Delete();

    return 0;
}
